﻿$(function () {
    $('.xdialog').click(function (e) {
        e.preventDefault();
        var link = $(this).attr("href");
        var title = $(this).attr("text")
        $.window({
            icon: 'http://mail.google.com/favicon.ico',
            checkBoundary: true,
            title: title,
            width: 800,
            height: 600,
            url: link
        });
    });

    $("#opener").click(function () {
        $.window({
            icon: 'http://www.youtube.com/favicon.ico',
            title: "YuTub",
            url: "http://www.youtube.com/embed/CevxZvSJLk8?list=PLwiBGptTigOof7ZhEIH_Pl8jksfvSM7oE",
            checkBoundary: true,
        });
    });

    $("#myBtn").click(function () {
        $("#myModal").modal();
        $('#myModal').on('shown.bs.modal', function () {
            $(this).find('.modal-dialog').css({
                height: '800px',
                width: 'auto',

                'max-height': '100%'
            });
        });
    })

});
function createWindowWithRemotingUrl(title,link) {
    $("#bodycontent").window({
        showModal: false,
        modalOpacity: 0.5,
        icon: "http://www.fstoke.me/favicon.ico",
        title: title,
        url: link
    });
}